import crossing from '../mock/crossing';
import Mock from 'mockjs';
import { createPromise } from '../util';
import request from '../request.js';
/** 路口综合指标 */
export const congestion = (data) => {
  return createPromise(Mock.mock(crossing['congestion']));
}

/** 交通流量监测 */
export const trafficVolume = (data) => {
  return createPromise(Mock.mock(crossing['trafficVolume']));
}

/** 排队长度监测 */
export const queueLength = (data) => {
  return createPromise(Mock.mock(crossing['queueLength']));
}

/** 异常告警 */
export const warning = (data) => {
  return createPromise(Mock.mock(crossing['warning']));
}

/** 平均等待时间 */
export const time = (data) => {
  return createPromise(Mock.mock(crossing['time']));
}

/** 平均停车次数 */
export const stop = (data) => {
  return createPromise(Mock.mock(crossing['stop']));
}

/** 交通流量、饱和度、均衡度信息 */
export const overview = (data) => {
  return createPromise(Mock.mock(crossing['overview']));
}

/** 获取路口列表 */
export const getCrossingList = (url) => request({
  url,
  method: 'GET'
});
